package com.liujit.upms.controller;

import com.liujit.minio.domain.BucketDetail;
import com.liujit.minio.service.BucketService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Description 存储桶管理接口
 * @Author LiuJun
 * @Date 2021-03-26 09:15:51
 */
@RequiredArgsConstructor
@RestController
@Api(tags = "存储桶管理接口")
@RequestMapping("/bucket")
public class BucketController {

    private final BucketService bucketService;

    @ApiOperation(value = "查询存储桶列表", notes = "查询存储桶列表")
    @GetMapping("/getList")
    public List<BucketDetail> getList() {
        return bucketService.listBuckets();
    }
}
